package com.hddx.domain;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
@Data
public class Student {
    @Value("10")
    private int id;
    @Value("张三")
    private String name;
    @Value("123456")
    private String password;

//    public String toString() {
//        return "Student{" +
//                "id=" + id +
//                ",name='" + name + '\'' +
//                ",password='" + password + '\'' +
//                "}";
//    }
    public void init(){
        System.out.println("初始化方法init");
    }
    public void destroy(){
        System.out.println("销毁方法destroy");
    }

}
